package com.ruoyi.system.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

public class HomeVo {

    @Data
    @ApiModel("病例统计")
    public static class Bltj {
        @ApiModelProperty("门急诊脑卒中患者数")
        private int mjznczhzs;
        @ApiModelProperty("住院脑卒中患者数")
        private int zynczhzs;
        @ApiModelProperty("患者总数")
        private int total;
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty("时间")
        private Date date;
        @ApiModelProperty("X轴时间")
        private String xDate;

        public int getTotal() {
            return mjznczhzs + zynczhzs;
        }
    }

    @Data
    @ApiModel("病例统计")
    public static class BltjResult {
        @ApiModelProperty("门急诊脑卒中患者数")
        private int mjznczhzs;
        @ApiModelProperty("住院脑卒中患者数")
        private int zynczhzs;
        @ApiModelProperty("患者总数")
        private int total;

    }
    @Data
    @ApiModel("性别分布")
    public static class Xbfb {
        @ApiModelProperty("男性")
        private int mjznczhzs;
        @ApiModelProperty("女性")
        private int zynczhzs;
        @ApiModelProperty("患者总数")
        private int total;
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty("时间")
        private Date date;
        @ApiModelProperty("X轴时间")
        private String xDate;

        public int getTotal() {
            return mjznczhzs + zynczhzs;
        }
    }

    @Data
    @ApiModel("性别分布")
    public static class XbfbResult {
        @ApiModelProperty("男性")
        private int mjznczhzs;
        @ApiModelProperty("女性")
        private int zynczhzs;
        @ApiModelProperty("患者总数")
        private int total;
    }

    @Data
    @ApiModel("年龄段分布")
    public static class NldfbData {
        @ApiModelProperty("0-19")
        private int num1 = 0;
        @ApiModelProperty("20-39")
        private int num2 = 0;
        @ApiModelProperty("40-59")
        private int num3 = 0;
        @ApiModelProperty("60-79")
        private int num4 = 0;
        @ApiModelProperty("患者总数")
        private int total = 0;
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty("时间")
        private Date date;
        @ApiModelProperty("X轴时间")
        private String xDate;
    }

    @Data
    @ApiModel("年龄段分布")
    public static class Nldfb {
        @ApiModelProperty("0-19")
        private int num1 = 0;
        @ApiModelProperty("20-39")
        private int num2 = 0;
        @ApiModelProperty("40-59")
        private int num3 = 0;
        @ApiModelProperty("60-79")
        private int num4 = 0;
        @ApiModelProperty("患者总数")
        private int total = 0;
    }

    @Data
    @ApiModel("病种分布")
    public static class BzfbTime {
        @ApiModelProperty("静脉溶栓")
        private int jmrsNum;
        @ApiModelProperty("介入再通")
        private int jrztNum;
        @ApiModelProperty("脑出血")
        private int ncxNum;
        @ApiModelProperty("颅内动脉瘤")
        private int lndmNuml;
        @ApiModelProperty("cea")
        private int ceaNum;
        @ApiModelProperty("cas")
        private int casNum;

        @JsonIgnore
        @ApiModelProperty("手术编码")
        private String ssbm;
        @JsonIgnore
        @ApiModelProperty("诊断编码")
        private String zdbm;
        @JsonIgnore
        @ApiModelProperty("档案ID")
        private Long id;
        @JsonIgnore
        @ApiModelProperty("住院日期")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date rysj;

        private String dateTime;
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date date;

//        public Date getDate(){
//            if (StrUtil.isNotEmpty(dateTime)) {
//                return DateUtil.parseDate(dateTime);
//            }
//            return null;
//        }
    }

    @Data
    public static class   Bzfb {
        @ApiModelProperty("静脉溶栓")
        private BigDecimal jmrs;
        @ApiModelProperty("介入再通")
        private BigDecimal jrzt;
        @ApiModelProperty("脑出血")
        private BigDecimal ncx;
        @ApiModelProperty("颅内动脉瘤")
        private BigDecimal lndml;
        @ApiModelProperty("cea")
        private BigDecimal cea;
        @ApiModelProperty("cas")
        private BigDecimal cas;
    }

    @ApiModel("门急诊诊断TOP10")
    @Data
    public static class MjzzdfbTop10 {
        @ApiModelProperty("中高危风险患者预防静脉血栓栓塞")
        private int zgwfxhzyfjmxsss = 0;
        @ApiModelProperty("蛛网膜下腔出血")
        private int zwmxqcx = 0;
        @ApiModelProperty("脑内出血")
        private int nnncx = 0;
        @ApiModelProperty("脑梗死")
        private int ngs = 0;
        @ApiModelProperty("脑卒中，未特指为出血或梗死")
        private int ncz = 0;
        @ApiModelProperty("入脑前动脉的闭塞或狭窄，未造成脑梗死")
        private int rnqdmdbshxz = 0;
        @ApiModelProperty("大脑动脉的闭塞和狭窄，未造成脑梗死")
        private int dndmbshxz = 0;
        @ApiModelProperty("其他脑血管病，急性动脉瘤")
        private int qtnxgb_jxdml = 0;
        @ApiModelProperty("分类于他处的疾病引起的脑血管疾患")
        private int flyqtcdjbyqdnxgjh = 0;
        @ApiModelProperty("短暂性脑出血发作和相关的综合征")
        private int dzxnqxfzxgzhz = 0;
    }
}
